const mongoose = require("mongoose");

var db = mongoose.connection;

async function main() {
  await mongoose.connect("mongodb://localhost:27017/blog");
}

main();
db.once("open", () => {
  console.log("server start ");
});
// console.log(db, "最后");
